import { combineReducers } from 'redux'
import { connectRouter } from 'connected-react-router'
import user from './user'
import config from './config'
import global from './global'
import projectLabelView from './projectLabelView'
import canvas from './canvas'
import editInfo from './editInfo'
import auth0 from './auth0'

const createRootReducer = history => combineReducers({
  router: connectRouter(history),
  [user.store]: user.reducer,
  [config.store]: config.reducer,
  [projectLabelView.store]: projectLabelView.reducer,
  [canvas.store]: canvas.reducer,
  [editInfo.store]: editInfo.reducer,
  [auth0.store]: auth0.reducer,
  [global.store]: global.reducer,
})

export {
  createRootReducer, user, config, projectLabelView, canvas, editInfo, auth0, global,
}
